package com.molin.threadTest.myCallableDemo2;

import java.util.concurrent.FutureTask;

public class MyCallableDemo {
    public static void main(String[] args) {
        MyCallable myCallable1=new MyCallable();

        FutureTask futureTask1=new FutureTask(myCallable1);
        FutureTask futureTask2=new FutureTask(myCallable1);
        Thread thread1=new Thread(futureTask1);
        Thread thread2=new Thread(futureTask2);

        thread1.setName("飞机");thread1.setPriority(10);
        thread2.setName("三蹦子");thread1.setPriority(2);

        thread1.start();
        thread2.start();
    }
}
